def math():
    while True:
        a = int(input('请输入大于0的数！！！:'))
        if a != 0:
            y, x, n, m, l,  = (0, 0, 0, 1, 0)
            while True:
                l = n
                n += m
                m += 1
                y += 1
                
                if a <= n:
                    break
            
            x = a - l - 1
            box1 = []
            box2 = []
            box = y
            for i in range(y):
                box1.append(i+1)
                box2.append(y-i)
            if y % 2 == 0:
                string = str(box1[x]) + '/' + str(box2[x])
            else:
                string = str(box2[x]) + '/' + str(box1[x])
            print(string)
        else:
            continue
math()
